#include "Timer.h"

Timer::Timer()
{
  Timed = false;  //initally turned off
  seconds = 0;
}

bool Timer::isTimed() const
// Returns true if the timed option is set, false otherwise
{
  return Timed;
}

int Timer::get()
// Returns the number of seconds set
{
  return seconds;
}

void Timer::set(int sec)
// Enables the Timer and sets number of seconds
{
  Timed = true;
  seconds = sec;
}

void Timer::enable(int en)
// 1 to turn on or 0 to turn off
{
  if((en == 1) && !isTimed())
    Timed = true;
  else{
	if((en == 0) && isTimed())
		Timed == false;
	}
}